#生成的可执行文件名
TARGET = run

#源文件路径 用‘：’隔开
CFLAGS=-I /usr/include/gstreamer-0.10 -I /usr/include/glib-2.0 -I /usr/include/include -I /usr/include/libxml2 -I /usr/lib/i386-linux-gnu/glib-2.0/include -I /usr/local/sqlite3/include -L /usr/local/sqlite3/lib
CFLAGS  += `pkg-config --cflags glib-2.0`
VPATH  = ../../plcc/net/:      ../../plcc/:\
	       ../../plcc/thread/:   ../../plcc/event_queue/:\
				 ../../plcc/setting/:  ../../plcc/video:\
				 ../../plcc/log/:     ../../plcc/picture: ./

#使用的编译工具
CC     = g++

#生成端中间文件
OBJ    = test.o SocketAddr.o Socket.o Server.o \
          ThreadException.o Thread.o Mutex.o Event.o\
					WorkThreads.o PlayThread.o SettingThread.o\
					CheckThread.o UpdateThread.o EventProcess.o LogThread.o\
					NetThread.o  I2CInterface.o  Picture.o Video.o\
					log.o ThreadMutex.o


$(TARGET):$(OBJ)
	$(CC) -o $(TARGET) $(OBJ) -lpthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lxml2 -lglib-2.0 -lsqlite3 -g 
%.o:%.cc  
	$(CC) $(CFLAGS) -c $<  


SocketAddr.o      : SocketAddr.h
Socket.o          : Socket.h
Server.o          : Server.h
ThreadException.o : ThreadException.h
Thread.o          : Thread.h
Mutex.o           : Mutex.h
Event.o           : Event.h
WorkThreads.o     : WorkThreads.h 
PlayThread.o      : WorkThreads.h
SettingThread.o   : WorkThreads.h
CheckThread.o     : WorkThreads.h
UpdateThread.o    : WorkThreads.h
EventProcess.o    : EventProcess.h
LogThread.o       : WorkThreads.h
NetWork.o         : NetWork.h
UserSettings.o    : UserSettings.h
I2CInterface.o    : I2CInterface.h
Controller.o      : Controller.h
log.o             : log.h
sqlite.o          : sqlite.h

.PHONY : clean
clean:
	-rm $(TARGET) $(OBJ)
